public interface ConfigurableWebApplicationContext extends WebApplicationContext, ConfigurableApplicationContext
ContextLoader
and
FrameworkServlet
.
Note: The setters of this interface need to be called before an
invocation of the ConfigurableApplicationContext.refresh()
method inherited from
ConfigurableApplicationContext
.
They do not cause an initialization of the context on their own.
ConfigurableApplicationContext.refresh()
,
ContextLoader.createWebApplicationContext(ServletContext)
,
FrameworkServlet.createWebApplicationContext(org.springframework.context.ApplicationContext)
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APPLICATION_CONTEXT_ID_PREFIX
Prefix for ApplicationContext ids that refer to context path and/or servlet name.
|
static java.lang.String |
SERVLET_CONFIG_BEAN_NAME
Name of the ServletConfig environment bean in the factory.
|
CONTEXT_ATTRIBUTES_BEAN_NAME, CONTEXT_PARAMETERS_BEAN_NAME, ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, SCOPE_APPLICATION, SCOPE_GLOBAL_SESSION, SCOPE_REQUEST, SCOPE_SESSION, SERVLET_CONTEXT_BEAN_NAME
CONFIG_LOCATION_DELIMITERS, CONVERSION_SERVICE_BEAN_NAME, ENVIRONMENT_BEAN_NAME, LOAD_TIME_WEAVER_BEAN_NAME, SYSTEM_ENVIRONMENT_BEAN_NAME, SYSTEM_PROPERTIES_BEAN_NAME
FACTORY_BEAN_PREFIX
CLASSPATH_ALL_URL_PREFIX
CLASSPATH_URL_PREFIX
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getConfigLocations()
Return the config locations for this web application context,
or
null if none specified. |
java.lang.String |
getNamespace()
Return the namespace for this web application context, if any.
|
ServletConfig |
getServletConfig()
Return the ServletConfig for this web application context, if any.
|
void |
setConfigLocation(java.lang.String configLocation)
Set the config locations for this web application context in init-param style,
i.e.
|
void |
setConfigLocations(java.lang.String... configLocations)
Set the config locations for this web application context.
|
void |
setNamespace(java.lang.String namespace)
Set the namespace for this web application context,
to be used for building a default context config location.
|
void |
setServletConfig(ServletConfig servletConfig)
Set the ServletConfig for this web application context.
|
void |
setServletContext(ServletContext servletContext)
Set the ServletContext for this web application context.
|
getServletContext
addApplicationListener, addBeanFactoryPostProcessor, addProtocolResolver, close, getBeanFactory, getEnvironment, isActive, refresh, registerShutdownHook, setEnvironment, setId, setParent
getApplicationName, getAutowireCapableBeanFactory, getDisplayName, getId, getParent, getStartupDate
containsBeanDefinition, findAnnotationOnBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType, getBeansWithAnnotation
containsLocalBean, getParentBeanFactory
containsBean, getAliases, getBean, getBean, getBean, getBean, getBean, getType, isPrototype, isSingleton, isTypeMatch, isTypeMatch
getMessage, getMessage, getMessage
publishEvent, publishEvent
getResources
getClassLoader, getResource
static final java.lang.String APPLICATION_CONTEXT_ID_PREFIX
static final java.lang.String SERVLET_CONFIG_BEAN_NAME
javax.servlet.ServletConfig
,
Constant Field Valuesvoid setServletContext(ServletContext servletContext)
Does not cause an initialization of the context: refresh needs to be called after the setting of all configuration properties.
ConfigurableApplicationContext.refresh()
void setServletConfig(ServletConfig servletConfig)
ConfigurableApplicationContext.refresh()
ServletConfig getServletConfig()
void setNamespace(java.lang.String namespace)
java.lang.String getNamespace()
void setConfigLocation(java.lang.String configLocation)
If not set, the implementation is supposed to use a default for the given namespace or the root web application context, as appropriate.
void setConfigLocations(java.lang.String... configLocations)
If not set, the implementation is supposed to use a default for the given namespace or the root web application context, as appropriate.
java.lang.String[] getConfigLocations()
null
if none specified.